},
_cancelDrag: function(eventTime) {
+ this.emit('drag-cancelled', eventTime);
this._dragInProgress = false;
let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation();
this.emit('window-drag-begin');
},
+ cancelledWindowDrag: function(source) {
+ this.emit('window-drag-cancelled');
+ },
+
endWindowDrag: function(source) {
this.emit('window-drag-end');
},
dragActorMaxSize: WINDOW_DND_SIZE,
dragActorOpacity: DRAGGING_WINDOW_OPACITY });
this._draggable.connect('drag-begin', Lang.bind(this, this._onDragBegin));
+ this._draggable.connect('drag-cancelled', Lang.bind(this, this._onDragCancelled));
this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd));
this.inDrag = false;
this.emit('drag-begin');
},
+ _onDragCancelled : function (draggable, time) {
+ this.emit('drag-cancelled');
+ },
+
_onDragEnd : function (draggable, time, snapback) {
this.inDrag = false;
Main.overview.beginWindowDrag();
overlay.hide();
}));
+ clone.connect('drag-cancelled',
+ Lang.bind(this, function(clone) {
+ Main.overview.cancelledWindowDrag();
+ }));
clone.connect('drag-end',
Lang.bind(this, function(clone) {
Main.overview.endWindowDrag();